home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1994 / MacHack 1994.toast / MacHack™94 / Talks & Papers / Timothy Knox / yerk 3.66 / Module source / Install < prev    next >
Text File  |  1994-06-24  |  17KB  |  541 lines

  1. \ 12/30/81  cbd Version 1
  2. \  2/04/86  cdn Moved in FinalSave ; added "Max Heap" button
  3. \  7/15/86  cdn Exported 
  4. \  7/17/86  cdn Added iBNDL & AddModRes
  5. \  7/28/86  cdn Added saveAppl
  6. \  6/07/91    rfl    modified for system 7 version. Works the same way as old one,
  7. \                but dictionary size refers to amount available above here.
  8. \  6/14/91    rfl    removed maxdict from module since is defined past floating point
  9. \                Instead, use msize !
  10. \                Dictionary size now means size past 'here', the current dictionary size.
  11. \  7/20/91    rfl    remove clobber for my use
  12. \ 10/17/91    rfl    easier to use for install process now. New dialog, better mem management
  13. \ 11/15/91    rfl    added readFP to saveNuc
  14. \  5/17/92    rfl    fixed cancel cosmetic problem
  15. \  5/18/93    rfl    application no longer uses Yerk file as base; it creates
  16. \                  a completely new file, copying resources out of Yerk, leaving Yerk untouched.
  17. \  5/23/93    rfl    added // sarray
  18. \  5/30/93    rfl added various frontend words so module will work with both yerk.com
  19. \                  and yerkFP.com.  Also changed ' (ticks) to 'c >body
  20. \  7/25/93    rfl    removed delete switches and added clobber switch; removed extra ctlwin code
  21. \  1/01/94    rfl    changed some ffcb calls for new file calls
  22. \  3/04/94    rfl    If creating an app, if the file already exists, delete it first.
  23. \                Max heap no longer resets stack to minstack
  24.  
  25. Decimal
  26.  
  27. :Module iMod
  28.  
  29.  
  30. Decimal
  31.  
  32. // ctl
  33. // ctlwind
  34. // vscroll
  35. // alert
  36.  
  37. \ This is a copy of the Alert" code from "AlertQ" and "Imports"
  38. \ It is duplicated here so that ALERTMOD is not required on the install disk
  39. \ alert support
  40. \  1/01/85  cbd Version 1
  41. \  9/05/85  cdn Added disp: method
  42. \  8/22/86  cdn Renumbered alert types to correspond with IM
  43.  
  44. 0 Variable tALRT here +base tALRT !
  45.     100 w, 51 w, 191 w, 462 w, 0 w, $ 7fff w,
  46.  
  47. 0 Variable tDITL here +base tDITL !
  48.     2 w,    \ # items-1
  49.     0,  58 w, 177 w,  80 w, 234 w,   4 c, 2 c, 'type ..OK w,
  50.     0,  60 w, 355 w,  81 w, 393 w, 136 c, 4 c, 'type 0000 ,
  51.     0,  10 w,  76 w,  42 w, 393 w, 136 c,
  52.  
  53. 3 Alert Alrt
  54.  
  55. \ Display alert using message saved in-line
  56. : (Al") { RC type -- }
  57.     RC
  58.     IF    \ build ALRT from scratch
  59.             12 newHandle        
  60.             dup 'type ALRT word0 nullOSstr call AddResource
  61.             >ptr tALRT 4+ swap 12 cMove
  62.         \ build DITL from scratch
  63.             R dup c@ align 50 + newHandle
  64.             dup 'type DITL word0 nullOSstr call AddResource
  65.             tDITL 36 + 4 blanks
  66.             RC s->d swap over dabs <# #s sign #> tDITL 36 + swap 4 min cMove
  67.             >ptr tDITL 4+ over 49 cMove
  68.             49 + over c@ 1+ cMove
  69.         arrowcurs
  70.         0 type disp: alrt
  71.         0 GetRes ALRT dup call RmveResource call ReleaseResource
  72.         0 GetRes DITL dup call RmveResource call ReleaseResource
  73.         type 0 max 3 min exec: Aact
  74.     THEN
  75.     R c@ 1+ align R> + >R
  76. ;
  77.  
  78. \ ( RC type : str" -- )  Compile conditional alert box
  79. : Alert"
  80.     ?comp Compile (al") word" c@ 1+ Align allot
  81. ; Immediate
  82.  
  83. : copyRsrc { id type \ hndl -- hndl } id type (getres) -> hndl
  84.         hndl call detachResource
  85.         hndl type id makeint nullOSStr call addResource hndl ;
  86.  
  87. 0 Value curStack
  88. 0 Value curDict
  89.  
  90. 8400 constant minHeap    \ can't set heap to less than this amt
  91. 52 constant stVal        \ 52 from location in nuc
  92.  
  93. \ ( handle -- handle )  mark the resource for update to disk
  94. : ChR dup call ChangedResource ;
  95.  
  96. : unlockSeg 2 getres CODE unlock ;
  97. : lockSeg 2 getres CODE lock ;
  98.  
  99. : readFP " fpInit" sFind
  100.     IF 2drop 5 'type CODE (getres) dup >ptr 'f> rot 0 swap call SizeResource cmove 
  101.     THEN ;
  102.  
  103. 2 constant IsApplication
  104. \ Save the current Yerk Code resource
  105. : saveCode2
  106.     2 GetRes CODE call ChangedResource    \ Mark nucleus for writing
  107.     word0 call ResError i->l 0 Alert" nucleus write error"
  108.     clear: ffcb
  109.     tib 410 erase        \ tib, num output, pad, aRegn
  110. \    0 msize !
  111.     cflush call ExitToShell ;    \ Causes nuc changes to be written, but first flush cache
  112.  
  113. \ Save CODE 2 resource without dictionary
  114. : saveNuc 
  115.     'c .s >body nfa dup 8 ! 12 !        \ assumes .s is last definition in nuc
  116.                                 \  store into initLast and initFenc (lastdef)
  117.     16 24 erase                    \ clear user initialization data
  118.                             \ but keep whatever is in msize
  119.     'c (key) 'c abort 20 + !        \ use primitive (key) again
  120.                                 \ assumes abort is original abort (16 offset)
  121.     readFP 
  122.     begin-dp @ 2- (codezone) saveCode2 ;
  123.  
  124. \ Save CODE 2 resource with dictionary; eliminating loaduser code
  125. : saveAppl
  126.     IsApplication 1 getres CODE >ptr 6 + c!        \ flag loader code that this is an appl.
  127.     1 'type CODE copyRsrc dup w 48 call setResAttrs chr call WriteResource
  128.     word0 call ResError i->l 0 Alert" code 1 write error"
  129.     0 'type CODE copyRsrc dup w 32 call setResAttrs chr call WriteResource
  130.     word0 call ResError i->l 0 Alert" code 0 write error"    
  131.     readFP
  132. \      $ 4e714e71 noload ! \ a nono, patch code, but we will flush the cache
  133.     cflush
  134.     0 ' iMod 8+ !        \ protect install code from purge
  135.     purge                \ purge all modules
  136.     0 -> path
  137.     fwind -> actw        \ set active window ptr to fwind, not iwind
  138.     $ 10000 here curDict + - 0 max allot    \ meet 64K boundary requirement
  139.     here  unlockSeg (codezone) lockSeg  
  140.     2 'type CODE copyRsrc w 48 call setResAttrs saveCode2 ;    \ save just enough
  141.  
  142. \ fetch starting stack headroom for this nucleus
  143. : @stack  stVal @ negate ;
  144. : !stack  curStack negate stVal ! ;
  145.  
  146. \ fetch starting heap size for this nucleus
  147. : @heap    s0 @stack -  begin-dp @ - msize @ - ;
  148.  
  149. \ determine amount of heap available for current configuration
  150. : curHeap  @heap @stack curStack - + room curDict - +  ;
  151.  
  152. \ set nucleus minimum heap value - no longer necessary
  153. : !heap  ; \  curHeap  mpatch ! ;
  154.  
  155. Decimal
  156.  
  157. : Closer  close: caller ;
  158.  
  159. Int theItem
  160. Var itemHandle
  161. Int itemType
  162.  
  163. 0 value rtm
  164.  
  165. :CLASS  Dialog  <Super X-Array
  166.  
  167.     Int        Resid
  168.     Var        dialPtr
  169.     Var        procPtr
  170.     Int        boldItem
  171.  
  172.     \ ( -- )
  173.     :M  CLOSE:  get: dialPtr  call DisposDialog   ;M
  174.  
  175.     :M  SET: get: dialPtr call setPort ;M
  176.  
  177.     \ ( item# -- hndl )  get handle for item#
  178.     :M  HANDLE:  { item# -- hndl }  get: dialPtr  item# makeInt
  179.         abs: itemType  abs: itemHandle  abs: tempRect
  180.         call GetDItem get: itemHandle  ;M
  181.  
  182.     \ draws the frame around the hilit item
  183.     :M  FRAME:     get: boldItem -dup
  184.         IF    savePort get: dialPtr call SetPort 3 3 pack call PenSize
  185.             handle: self drop -4 -4 inset: tempRect
  186.             abs: tempRect 16 16 pack call FrameRoundRect call penNormal restPort
  187.         THEN ;M
  188.  
  189.     \ ( -- )  create dialog from resID
  190.     :M  GETNEW:  0 int: resid 0 -1  call GetNewDialog put: dialPtr
  191.         frame: self    ;M
  192.  
  193.     :M  SHOW: get: dialPtr call showWindow frame: self ;M
  194.  
  195.     \ ( cfa -- )  set dialog proc
  196.     :M  SETPROC: >body put: procPtr ;M
  197.  
  198.     \ ( -- )  display as modal dialog
  199.     :M  MODAL:
  200.         BEGIN
  201.             get: procPtr dup IF +base THEN abs: theItem call ModalDialog
  202.             get: theItem ( 1-) exec: super
  203.             rtm
  204.         WHILE
  205.             0 -> rtm    \ iterate every time ReturnToModal is executed
  206.         REPEAT
  207.     ;M
  208.  
  209.     \ ( act0 ... actN -- )  set the dialog's action handlers starting at element 1
  210.     :M  ACTIONS: ?ixobj limit 1- 0
  211.         DO limit i- 1- (^elem) !
  212.         LOOP   ;M
  213.  
  214.     \ ( val item# -- )
  215.     :M  PUT:  handle: self  swap makeInt call SetCtlValue   ;M
  216.  
  217.     \ ( item# -- val ) get value for an item#
  218.     :M  GET:   handle: self  >R word0 R>
  219.         call GetCtlValue word0  ;M    \ added word0 cbd 7/17/85
  220.  
  221.     \ ( resID -- )  Associate object with its resource
  222.     :M  INIT:  put: resID   ;M
  223.  
  224.     \ ( item# -- )  Causes bold outline of the specified item
  225.     :M  HILITE: put: boldItem ;M
  226.  
  227.     \ ( item# -- addr len )  return a text item's text
  228.     :M  GETTEXT: handle: self  buf255 +base   get: ItemType dup 24 and
  229.         IF   drop call GetIText
  230.         ELSE 4 and
  231.              IF   call GetCTitle
  232.              ELSE 2drop 0 buf255 c!        \ user item has no text
  233.             THEN
  234.         THEN
  235.         buf255 count  ;M
  236.  
  237.     \ ( addr len item# -- )  store an item's text
  238.     :M  PUTTEXT: { addr len item# -- } item#  handle: self
  239.         addr len str255   get: ItemType dup 24 and
  240.         IF   drop call SetIText
  241.         ELSE 4 and
  242.              IF   call SetCTitle
  243.              ELSE 2drop                    \ user item has no text
  244.              THEN
  245.         THEN   ;M
  246.  
  247.     \ ( start end item# )  set selection range for text item
  248.     :M  SETSELECT:  { start end item# -- }  get: dialPtr
  249.         item# makeInt start end pack  call SeliText  ;M
  250.  
  251.     \ ( -- )  force drawing of dialog before going to modal:
  252.     :M  DRAW:   get: dialPtr call DrawDialog ;M
  253.  
  254.     \  set user item into dialog; userItem must start with rectangle data
  255.     :M  SETUSERITEM: { userItem -- }
  256.         get: dialPtr getParms: userItem abs: userItem call setDItem ;M
  257.  
  258.     \ ( -- )  Initialize default handlers to close the dialog box
  259.     :M  CLASSINIT:  limit 0 DO 'c closer i to: self LOOP  ;M
  260.  
  261. ;CLASS
  262.  
  263. \ signal modal method to re-enter ModalDialog
  264. : ReturnToModal
  265.     1 -> rtm ;
  266.  
  267. \ Toggle the check box or radio button
  268. : togItem
  269.     get: theItem 1 over get: caller - swap put: caller
  270.     ReturnToModal
  271. ;
  272.  
  273. \ ( addr0 len0 addr1 len1 addr2 len2 addr3 len3 -- )  Substitute Dialog text
  274. : ParamText { \ p1 p2 p3 -- }
  275.      str255 dup -> p3   -base count +
  276.     >str255 dup -> p2   -base count +
  277.     >str255 dup -> p1   -base count +
  278.     >str255     p1 p2 p3 call ParamText
  279. ;
  280.  
  281. 16 dialog iDlg
  282. 111 init: iDlg
  283. 1 hilite: iDlg
  284.  
  285. \ ( addr1 len1 addr2 len2 -- )  Install informatory message
  286. : iMsg    "  " "  " ParamText draw: iDlg ;
  287.  
  288. \ need to load this because sarray is in different
  289. \ locations in yerk.com and yerkFP.com
  290. // pathList
  291. forget getptxt
  292. // listman
  293.  
  294. \ install a resource type module
  295. : AddModRes { mdef arg \ resID -- }
  296.     mdef @ modCode <> IF exit THEN
  297.      mdef indexOf: nMods IF drop ELSE exit THEN
  298.     mdef >name n>count binName name: fFcb
  299.     openReadOnly: fFcb IF exit THEN
  300.     mdef 12 + dup @ $ 7fffffff and killPtr        \ mask out keep bit and kill
  301.     0 swap !                                    \ don't care about keep anymore 
  302.     " Module:" getName: fFcb iMsg
  303.     size: fFcb align new: mHndl    \ Create a new handle for this module
  304.     ptr: mHndl size: mHndl  read: fFcb 0 Alert" Module read failed"
  305.     close: fFcb drop
  306.     word0 'type CODE call UniqueID i->l -> resID
  307.     get: mHndl dup 'type CODE resID makeInt        \ Create new Module resource
  308.     mdef >name n>count str255 call AddResource
  309.     dup w 16 call SetResAttrs                    \ mark resource locked
  310.     ChR call WriteResource                        \ write it to application file
  311.     word0 call ResError i->l 0 Alert" Module rsrc write failed.  Check disk space or try Delete modules option."
  312.     resID mdef 22 + w!                            \ store module resID
  313. \    14 get: iDlg IF delete: fFcb drop THEN        \ free up disk space?
  314. ;
  315.  
  316. \ ( item# -- )
  317. : invWord errbeep 0 $ ffff rot setSelect: iDlg ReturnToModal ;
  318.  
  319. \ ( -- True )  validate quit & abort words; if bad return to modal
  320. : okBtn \ { \ qv -- }
  321.     10 getText: iDlg sFind 0= IF 10 invWord exit THEN
  322.     drop cfa -> quitVec
  323.     11 getText: iDlg sFind 0= IF 11 invWord exit THEN
  324.     drop cfa -> abortVec
  325.     12 getText: iDlg sFind 0= IF 12 invWord exit THEN
  326.     drop cfa -> objInit
  327.     True
  328. ;
  329.  
  330. 11 'cfas okBtn False null null null null null null null null null
  331. 4 'cfas null togItem togItem togItem
  332. actions: iDlg
  333.  
  334. Int apRefNum
  335. Var apParam
  336. String applName
  337.  
  338. : getR
  339.     128 GetRes BNDL >ptr @ sp@ 4 3 putText: iDlg
  340.     0 swap (GetRes) >ptr count   4 putText: iDlg
  341.     buf255 +base abs: apRefNum abs: apParam call GetAppParms
  342.     buf255 count 2dup            5 putText: iDlg put: applName
  343.     129 GetRes FREF >ptr @ sp@ 4 6 putText: iDlg drop
  344.     130 GetRes FREF >ptr @ sp@ 4 7 putText: iDlg drop
  345.     131 GetRes FREF >ptr @ sp@ 4 8 putText: iDlg drop
  346.     132 GetRes FREF >ptr @ sp@ 4 9 putText: iDlg drop
  347. ;
  348.  
  349. \ ( addr len -- (addr) )  fetch 1st four bytes on an odd byte, pad with blanks
  350. : drop@ >R sp@ $ 20202020 rot rot R> 4 min cMove ;
  351.  
  352.  
  353. : putR
  354.     128 'type BNDL copyRsrc dup call writeResource put: mHndl
  355.     3 getText: iDlg drop@ dup ptr: mHndl !    ( newSig to BNDL)
  356.     get: mHndl call changedResource
  357.     get: applName name: fFcb 'type APPL over set: fFcb
  358.     4 getText: iDlg dup 1+ align new: mHndl        ( newSig addr len )
  359.       str255 -base ptr: mHndl over c@ 1+ cMove    ( newSig )
  360.       get: mHndl swap word0 nullOSstr call AddResource get: mHndl call writeResource
  361.     10 5 DO i getText: iDlg drop@ 129 getres FREF >ptr !
  362.             123 i+ 'type FREF copyRsrc dup w 32 call setResAttrs
  363.             chr call writeResource
  364.          LOOP
  365.     13 get: iDlg 8 << 256 getres WIND >ptr 10 + w!
  366.      256 'type WIND copyRsrc call writeResource
  367.     133 128 DO i 'type ICN# copyRsrc dup
  368.                w 32 call setResAttrs chr
  369.                call writeResource
  370.             LOOP
  371.     1 'type vers copyRsrc call writeResource
  372.     -1 'type SIZE copyRsrc call writeResource
  373. ;
  374.  
  375. \ set dictionary heap and stack to selected values
  376. \ for apps, the old dictionary had become the new nucleus
  377. : setMem here curDict + ( begin-dp @ -) msize ! ( !heap) !stack
  378.     here 4+ msize 12 - ! \ store new initdp, leave 4 bytes room at end
  379.     latest 8 ! ;        \ store last definition
  380.     
  381.  
  382. \ clobber name fields in nucleus - can't clobber in entire dictionary
  383. \  without leaving :proc definitions intact because of the way initProcs
  384. \  searches the dictionary.
  385. : killName  n>count 1 fill ;
  386. : clobber  'c cold >body nfa
  387.     BEGIN  dup killName  pfa lfa @ dup 'c fWind >body nfa =
  388.     UNTIL drop   ;
  389.  
  390. \ This will clobber the entire dictionary. This could be fatal if your code
  391. \   does a search of the dictionary at runtime. For that reason, this code
  392. \   is not used here.
  393. \ : (clobber)  ( mycfa parm --)  drop >body nfa killName ;
  394. \ : clobber 'c (clobber) 0 trav ;
  395.  
  396. 1 Value icurs
  397.  
  398. : iBNDL 
  399.     'c bye 0 to: Aact    \ Alert action
  400.     new: applName
  401.     getnew: iDlg
  402.     getR
  403.     " NULW" 10 putText: iDlg
  404.     " fpInit" sFind IF 2drop " CLEANFLOAT" ELSE " CLEAN2" THEN
  405.     11 putText: iDlg
  406.     latest n>count 12 putText: iDlg    \ ******
  407.     0 $ ffff 5 setSelect: iDlg
  408.     modal: iDlg
  409.     IF    watchcurs
  410.         5 getText: iDlg    2dup put: applName    \ get new filename
  411.         str255 call createResFile            \ create new file by that name
  412.         word0 call ResError i->l -48 =        \ if file already exists, delete it
  413.         IF new: loadfile get: applName name: topfile
  414.             delete: topfile remove: loadfile
  415.             get: applName str255 call createResFile
  416.         THEN
  417.         5 getText: iDlg name: fFcb             \ want to set finder flags
  418.         getfileinfo: ffcb 0 Alert" getfileinfo error"
  419.         ffcb 40 + w@ $ 2100 or ffcb 40 + w!    \ set bndl bit and init bit
  420.         setFileInfo: ffcb 0 Alert" setfileinfo error"
  421.         lock: applName
  422.         word0 get: applName str255 unlock: applName
  423.         call openResFile i->l 0< not
  424.         IF putR                    \ store new resources
  425.             " Installing ^0 ^1" 23 putText: iDlg
  426.             'c AddModRes 0 trav        \ Convert modules on this disk into resources
  427.             " Dictionary" "  " iMsg
  428.             init: loadFile
  429. \            15 get: iDlg IF get: imageName name: fFcb delete: fFcb drop THEN
  430.             14 get: iDlg IF clobber THEN        \ fsecure nucleus
  431.             setMem saveAppl                        \ save application
  432.         ELSE close: iDlg 1 1 alert" couldn't open appl resource file" abort
  433.         THEN
  434.     THEN
  435.     release: applName
  436.     close: iDlg
  437.     'c IMOD mUnlock 'c abort 0 to: Aact icurs -> curs set: fwind become quit ;
  438.  
  439.  
  440. vScroll vs1
  441. vScroll vs2
  442.  
  443. Control saveBtn
  444. Control instBtn
  445. Control canBtn
  446. Control heapBtn
  447.  
  448. Control mxSt  radioID  init: mxSt
  449. Control miSt  radioID  init: miSt
  450. Control mxDi  radioID  init: mxDi
  451. Control miDi  radioID  init: miDi
  452.  
  453. \ Rectangles for formatting screen
  454. Rect stRect    \ stack headroom
  455. 20 20 170 40 put: stRect
  456. Rect hpRect    \ heap start size
  457. 20 45 170 65 put: hpRect
  458. Rect diRect    \ Dictionary headroom
  459. 20 70 170 90 put: diRect
  460.  
  461. rect wRect
  462. 100 40 400 170 put: wRect
  463.  
  464. \ get current limits for stack and dict based on minHeap
  465. : maxiStack  curStack curHeap minHeap - + ;
  466. : maxiDict   curDict  curHeap minHeap - + ;
  467. 9000 value minStack
  468.  128 value minDict
  469.  
  470. \ print number in rect
  471. : .Val  { n theRect -- }  tempRect =: theRect
  472.     4 4 inset: tempRect 100 putTopX: tempRect clear: tempRect
  473.     104 getboty: tempRect  gotoxy n 7 .r  ;
  474.  
  475. : .vs1  curStack stRect .val curHeap hpRect .val ;
  476. : .vs2  curDict  diRect .val curHeap hpRect .val ;
  477.  
  478. : drawIwind  draw: stRect draw: hpRect draw: diRect
  479.    2 tmode 0 tfont 12 tsize
  480.    24 36 gotoxy ." Stack:"
  481.    24 61 gotoxy ." Heap:"
  482.    24 86 gotoxy ." Dictionary:"  .vs1 .vs2  ;
  483.  
  484. \ Define the Install utility window
  485. ctlWind iWind
  486. 4 'cfas  null null drawIwind null actions: iWind
  487.  
  488. \ listen to mouse and drop keys
  489. : listener  BEGIN key drop AGAIN  ;
  490.  
  491. \ Create new window, controls
  492. : Install
  493.     wRect "  " dlgWind True False new: iWind
  494.     180 15 33 iWind new: vs1  180 65 33 iWind new: vs2
  495.     2000 32000 putRange: vs1  0 8000 putRange: vs2
  496.     4000 dup put: vs1  put: vs2
  497.     @stack -> curStack  room -> curDict
  498.     197 14 " ++" iWind new: mxSt
  499.     197 30 " --" iWind new: miSt
  500.     197 64 " ++" iWind new: mxDi
  501.     197 80 " --" iWind new: miDi
  502.     238 20 " Save" iWind new: saveBtn
  503.     236 45 " Install" iWind new: instBtn
  504.     236 70 " Cancel" iWind new: canBtn
  505.     150 105 " Max Heap" iWind new: heapBtn
  506.     update: iWind   curs -> icurs -curs
  507.     Become listener ;
  508.  
  509. : stDn  curStack 8 - minStack max -> curStack  .vs1  ;
  510. : stUp  curStack 8+  maxiStack min -> curStack  .vs1  ;
  511.  
  512. : diDn  curDict 32 -  minDict max -> curDict  .vs2  ;
  513. : diUp  curDict 32 +  maxiDict min -> curDict  .vs2  ;
  514.  
  515. 5 'cfas stUp stDn null null null actions: vs1
  516. 5 'cfas diUp diDn null null null actions: vs2
  517.  
  518. : config   curDict here + begin-dp @ - msize ! ( !heap) !stack  saveNuc ;
  519. : wInstall close: iWind buildmodWind  ;
  520. : cancel   close: iWind 'c IMOD mUnlock icurs -> curs set: fwind become quit ;
  521.  
  522.  
  523. : doMxSt  curStack 512 + maxiStack min -> curStack .vs1 ;
  524. : doMiSt  curStack 512 - minStack max -> curStack .vs1 ;
  525. : doMxDi  curDict 8192 + maxiDict min -> curDict .vs2 ;
  526. : doMiDi  curDict 8192 - minDict max -> curDict .vs2 ;
  527. : doMxHp  ( minStack -> curStack ) .vs1  minDict -> curDict .vs2 ;
  528. : buildInstall acceptSelect iBndl ;
  529. 'c BuildInstall actions: selectBut
  530.  
  531. 'c config   actions: saveBtn
  532. 'c wInstall actions: instBtn
  533. 'c cancel   actions: canBtn
  534. 'c doMxSt   actions: mxSt
  535. 'c doMiSt   actions: miSt
  536. 'c doMxDi   actions: mxDI
  537. 'c doMiDi   actions: miDi
  538. 'c doMxHp   actions: heapBtn
  539.  
  540. ;Module
  541.